import os
from urllib.request import urlretrieve
url = 'http://22331122.com:88/api/Vaildatacode' # 验证码下载地址
def download_jpg(folder, num):
	if not os.path.exists(folder):
		os.makedirs(folder)
	for i in range(num):
		urlretrieve(url, '%s/imgcode-%d.jpg' % (folder, i))
download_jpg('image', 100)
download_jpg('test', 100)
